# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AssetGroupListingGroupFilter do
  @moduledoc """
  AssetGroupListingGroupFilter represents a listing group filter tree node in an asset group.

  ## Attributes

  *   `assetGroup` (*type:* `String.t`, *default:* `nil`) - Immutable. The asset group which this asset group listing group filter is part of.
  *   `caseValue` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension.t`, *default:* `nil`) - Dimension value with which this listing group is refining its parent. Undefined for the root group.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the ListingGroupFilter.
  *   `parentListingGroupFilter` (*type:* `String.t`, *default:* `nil`) - Immutable. Resource name of the parent listing group subdivision. Null for the root listing group filter node.
  *   `path` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ListingGroupFilterDimensionPath.t`, *default:* `nil`) - Output only. The path of dimensions defining this listing group filter.
  *   `resourceName` (*type:* `String.t`, *default:* `nil`) - Immutable. The resource name of the asset group listing group filter. Asset group listing group filter resource name have the form: `customers/{customer_id}/assetGroupListingGroupFilters/{asset_group_id}~{listing_group_filter_id}`
  *   `type` (*type:* `String.t`, *default:* `nil`) - Immutable. Type of a listing group filter node.
  *   `vertical` (*type:* `String.t`, *default:* `nil`) - Immutable. The vertical the current node tree represents. All nodes in the same tree must belong to the same vertical.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :assetGroup => String.t() | nil,
          :caseValue =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension.t()
            | nil,
          :id => String.t() | nil,
          :parentListingGroupFilter => String.t() | nil,
          :path =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ListingGroupFilterDimensionPath.t()
            | nil,
          :resourceName => String.t() | nil,
          :type => String.t() | nil,
          :vertical => String.t() | nil
        }

  field(:assetGroup)

  field(:caseValue,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension
  )

  field(:id)
  field(:parentListingGroupFilter)

  field(:path,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_ListingGroupFilterDimensionPath
  )

  field(:resourceName)
  field(:type)
  field(:vertical)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AssetGroupListingGroupFilter do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AssetGroupListingGroupFilter.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AssetGroupListingGroupFilter do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
